import { ColumnGroupType, ColumnType } from "antd/es/table"

import { renderNullableValue } from "./venueProfitAndLoss"

const memberAndLossRanking = (newFormat: (arg: string) => string): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	mLossRankingMemberRank: {
		key: "memberRank",
		dataIndex: "memberRank",
		width: 120,
		render: renderNullableValue("memberRank"),
		title: newFormat("report.member_loss_member_rank"),
		align: "center",
		fixed: false
	},
	mLossRankingMemberName: {
		key: "memberName",
		dataIndex: "memberName",
		width: 120,
		render: renderNullableValue("memberName"),
		title: newFormat("report.member_loss_member_name"),
		align: "center",
		fixed: false
	},
	mLossRankingTopProxyName: {
		key: "topProxyName",
		dataIndex: "topProxyName",
		width: 120,
		render: renderNullableValue("topProxyName"),
		title: newFormat("report.top_proxy_name"),
		align: "center",
		fixed: false
	},
	mLossRankingCreditQuota: {
		key: "creditQuota",
		dataIndex: "creditQuota",
		width: 120,
		render: renderNullableValue("creditQuota", "$"),
		title: newFormat("report.member_credit_quota"),
		align: "center",
		fixed: false
	},
	mLossRankingLoanAmount: {
		key: "loanAmount",
		dataIndex: "loanAmount",
		width: 120,
		render: renderNullableValue("loanAmount", "$"),
		title: newFormat("report.member_loan_amount"),
		align: "center",
		fixed: false
	},
	mLossRankingVenueName: {
		key: "venueName",
		dataIndex: "venueName",
		width: 120,
		render: renderNullableValue("venueName"),
		title: newFormat("report.member_loss_venue_anme"),
		align: "center",
		fixed: false
	},
	mLossRankingValidBetAmount: {
		key: "validBetAmount",
		dataIndex: "validBetAmount",
		width: 120,
		render: renderNullableValue("validBetAmount", "$"),
		title: newFormat("report.valid_bet_amount"),
		align: "center",
		fixed: false
	},
	mLossRankingMaxBetAmount: {
		key: "maxBetAmount",
		dataIndex: "maxBetAmount",
		width: 120,
		render: renderNullableValue("maxBetAmount", "$"),
		title: newFormat("report.member_loss_max_bet_amount"),
		align: "center",
		fixed: false
	},
	mLossRankingHisRebateAmount: {
		key: "hisRebateAmount",
		dataIndex: "hisRebateAmount",
		width: 120,
		render: renderNullableValue("hisRebateAmount", "$"),
		title: newFormat("report.member_loss_his_rebate_amount"),
		align: "center",
		fixed: false
	},
	mLossRankingNetAmount: {
		key: "netAmount",
		dataIndex: "netAmount",
		width: 120,
		render: renderNullableValue("netAmount", "$"),
		title: newFormat("report.net_amount"),
		align: "center",
		fixed: false
	},
	mLossRankingHisNetAmount: {
		key: "hisNetAmount",
		dataIndex: "hisNetAmount",
		width: 120,
		render: renderNullableValue("hisNetAmount", "$"),
		title: newFormat("report.member_loss_his_net_amount"),
		align: "center",
		fixed: false
	}
})

export default memberAndLossRanking
